package com.ycx.furns.service.impl;

import com.ycx.furns.dao.MemberDAO;
import com.ycx.furns.dao.impl.MemberDAOImpl;
import com.ycx.furns.entity.Furn;
import com.ycx.furns.entity.Member;
import com.ycx.furns.entity.Page;
import com.ycx.furns.service.MemberService;

import java.util.List;

public class MemberServiceImpl implements MemberService {
    MemberDAO memberDAO = new MemberDAOImpl();
    @Override
    public boolean registerCheck(String name) {
        return memberDAO.getMember(name) == null ;
    }

    @Override
    public boolean registerMember(Member member) {
        return memberDAO.saveMember(member) == 1;
    }

    @Override
    public Member loginCheck(String name, String pwd) {
        return memberDAO.getMemberByNameAndPwd(name, pwd);
    }


}
